﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections.ObjectModel;

namespace Fireball.Syntax.Parser
{
    public class PatternCollection : ObservableCollection<Pattern>
    {
        private PatternGroup group = null;

        public PatternCollection(PatternGroup group)
        {
            this.group = group;
        }
        protected override void InsertItem(int index, Pattern item)
        {
            item.PatternGroup = this.group;
            base.InsertItem(index, item);            
        }
    }
}
